count pairs with given sum gfg